load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/canister_client/sender",
    "//rs/certification/test-utils",
    "//rs/crypto/iccsa",
    "//rs/crypto/internal/crypto_lib/basic_sig/der_utils",
    "//rs/crypto/internal/crypto_lib/basic_sig/iccsa/test_utils",
    "//rs/crypto/internal/crypto_lib/threshold_sig/bls12_381",
    "//rs/crypto/internal/crypto_lib/types",
    "//rs/crypto/secrets_containers",
    "//rs/crypto/test_utils",
    "//rs/crypto/tree_hash",
    "//rs/types/types",
    "@crate_index//:rand",
    "@crate_index//:simple_asn1",
    "@crate_index//:strum",
]

DEV_DEPENDENCIES = [
    # Keep sorted.
    "//rs/crypto/internal/crypto_lib/basic_sig/ed25519",
    "//rs/crypto/test_utils/reproducible_rng",
    "@crate_index//:assert_matches",
]

MACRO_DEPENDENCIES = [
    # Keep sorted.
    "@crate_index//:strum_macros",
]

DEV_MACRO_DEPENDENCIES = []

ALIASES = {}

rust_library(
    name = "http_request_test_utils",
    testonly = True,
    srcs = glob(["src/**/*.rs"]),
    aliases = ALIASES,
    crate_name = "ic_validator_http_request_test_utils",
    proc_macro_deps = MACRO_DEPENDENCIES,
    deps = DEPENDENCIES,
)

rust_test(
    name = "http_request_test_utils_test",
    crate = ":http_request_test_utils",
    proc_macro_deps = DEV_MACRO_DEPENDENCIES,
    deps = DEV_DEPENDENCIES,
)
